<!DOCTYPE html>
<html lang="en">

	<include file="Public:header" />
	<include file="Public:page_css" />
 
	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">

		<include file="Public:nav" />
		<div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-12">
                <h2>会员列表</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="{:U('Index/index')}"><i class="fa fa-home"></i> 主页</a>
                    </li>
                    <li>会员管理</li>
                    <li><strong>会员列表</strong></li>
                </ol>
            </div>              
        </div>
        <br />
		<link rel="stylesheet" type="text/css" media="all" href="__PUBLIC__/sldate/daterangepicker-bs3.css" />
		<script src="__PUBLIC__/Admin/js/jquery.min.js"></script>	
		<script type="text/javascript" src="__PUBLIC__/sldate/moment.js"></script>
		<script type="text/javascript" src="__PUBLIC__/sldate/daterangepicker.js"></script>
		<script type="text/javascript">
               $(document).ready(function() {
                  $('#reservation').daterangepicker(null, function(start, end, label) {
                    console.log(start.toISOString(), end.toISOString(), label);
                  });
               });
        </script>
        <div class="row">
			<div class="col-sm-12">							    				  
			    <form name="admin_list_sea" class="form-search" method="post" action="__URL__/index">
					<div  class="col-sm-2">
						<div class="input-group" style="width: 240px">	
						<span class="input-group-addon"><i class="fa fa-calendar"></i></span>							
							<input type="text" class="form-control" name="reservation" id="reservation" class="sl-date" value="{$s}" placeholder="点击选择注册日期范围"/>	
						</div>
					</div>
					<div class="col-sm-3">
						<div class="input-group">
							<input type="text" name="key" id="key" class="form-control" value="{$val}" placeholder="输入需查询的用户名" />	
							<span class="input-group-btn"> 
				            	<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button> 
				            </span>
						</div>
					</div>
				</form>	
				<div class="col-sm-1">
					<div class="input-group">
			            <a href="{:U('Member/user_list_add')}" class="btn btn-primary">添加会员</a>
			        </div>
			    </div>		   			    
			</div>
		</div>		
		
		<br />
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5><i class="fa fa-tasks"></i> 用户列表</h5>
					</div>
					<div class="ibox-content">
					<form id="leftnav" name="leftnav" method="post" action="" >
                    <input type="hidden" name="checkk" id="checkk" value="1" />
                   
						<table class="table table-bordered">
							<thead>
								<tr class="long-tr">
									<th width="5%">ID</th>
									<th width="10%">姓名</th>
									<!-- <th width="5%">性别</th> -->
									<th width="10%">注册时间</th>
									<th width="10%">身份证号</th>
									<th width="10%">手机号</th>
									<th width="15%">注册ip</th>
									<th width="10%">级别</th>
									<th width="10%">上级id</th>
									<th width="10%">操作</th>
								</tr>
							</thead>
						
								<volist name="lists" id="vo">

								<tr class="long-td">  
								  	<td>{$vo.id}</td>
									<td>{$vo.truename}</td>
									<!-- <td>
																	  		{{# if(d[i].sex==1){ } 
																	  			男
																	  		{{# }else{ }
																	  			女
																	  		{{# } }
									</td> -->
									<td>{$vo.ctime}</td>
									<td>{$vo.idcard}</td>
									<td>{$vo.mobile}</td>
									<td>{$vo.ip}</td>
									<td>{$vo.jb}</td>
									<td>{$vo.invite_id}</td>
									<td>
										<a href="{:U('user_list_edit',array('userid'=>$vo['id']))}" class="btn btn-primary btn-xs">
											<i class="fa fa-paste"></i>编辑</a>&nbsp;&nbsp;
										<a href="{:U('tree',array('userid'=>$vo['id']))}" class="btn btn-primary btn-xs">
											<i class="fa fa-paste"></i>家族结构</a>&nbsp;&nbsp;
										<a onclick="return del({$vo.id});" href="javascript:;" class="btn btn-danger btn-xs">
											<i class="fa fa-trash-o"></i> 删除</a>
											<eq name="vo.user_frozen" value="1"><a onclick="return rm_frozen({$vo.id});" href="javascript:;" class="btn btn-primary  btn-xs">
											<i class="fa fa-trash-o"></i> 解冻账号</a><else/><a onclick="return frozen({$vo.id});" href="javascript:;" class="btn btn-danger btn-xs">
											<i class="fa fa-trash-o"></i> 冻结账号</a></eq>
										
									</td>
								</tr>	
								</volist>
				
							<tbody id="article_list"></tbody>
							
						</table>
					
					</form>
						
					<div class="pages" style=" text-align: right;">{$page}</div>
											
					</div>
				</div>
			</div>
		</div>
	<script type="text/javascript" src="__PUBLIC__/Common/laytpl/laytpl.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Common/laypage/laypage.js"></script>
	<include file="Public:footer" />
	<script>
	function del(id) {
		if(confirm("确认删除吗，删除后不可恢复"))
{
      $.post('{:U("deluser")}',
		  {id:id},
	function(data){
		if(data==1){
			layer.alert('删除成功', {icon: 6}, function(index){
            layer.close(index);
            window.location.reload();
            });
		}
	});
}
		
	}

		function frozen(id) {

      $.post('{:U("frozen")}',
		  {id:id},
	function(data){
		if(data==1){
			layer.alert('冻结成功', {icon: 6}, function(index){
            layer.close(index);
            window.location.reload();
            });
		}
	});

		
	}

		function rm_frozen(id) {

      $.post('{:U("rm_frozen")}',
		  {id:id},
	function(data){
		if(data==1){
			layer.alert('解冻成功', {icon: 6}, function(index){
            layer.close(index);
            window.location.reload();
            });
		}
	});
		
	}
	
</script>

	</body>

</html>

